home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWFiles / Include / SLFileAc.xih < prev    next >
Encoding:
Text File  |  1996-04-23  |  14.7 KB  |  486 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SLFileAc.xih.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxih.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  * 
  13.  *     File:                SLFileAc.idl
  14.  *     Release Version:    $ ODF 1 $
  15.  * 
  16.  *     Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  17.  * 
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_FW_OFileSink_xih
  23. #define SOM_FW_OFileSink_xih
  24.  
  25. #include <somcls.xh>
  26. #include <somcm.xh>
  27.  
  28. /*
  29.  * Passthru lines: File: "C.xih", "before"
  30.  */
  31.  
  32.  
  33. #ifndef SOM_FW_OFileSink_xh
  34. #include <SLFileAc.xh>
  35. #endif
  36.  
  37. /*
  38.  * Set the scope of methods functions
  39.  */
  40. #ifndef SOM_Scope
  41. #define SOM_Scope extern "C"
  42. #endif
  43.  
  44. #define FW_OFileSink_MaxNoMethods 2
  45.  
  46. /*
  47.  * -- Instance Data
  48.  */
  49.  
  50. /*
  51.  * -- Use best possible alignment for instance data slice.
  52.  */
  53. #if PRAGMA_ALIGN_SUPPORTED
  54. #  pragma options align=power
  55. #endif
  56. typedef struct FW_OFileSinkData {
  57.     FW_OFile* fRep;
  58. } FW_OFileSinkData;
  59. #if PRAGMA_ALIGN_SUPPORTED
  60. #  pragma options align=reset
  61. #endif
  62.  
  63. /*
  64.  * -- Getdata Macro
  65.  */
  66.  
  67. /*
  68.  * -- This emitter treats Data Tokens as Thunks by default.
  69.  * -- Use the sc modifier "nothunks" to override this default.
  70.  */
  71. SOMEXTERN typedef FW_OFileSinkData* (* SOMLINK somTD_FW_OFileSink_DataThunk)(void*);
  72. #define FW_OFileSinkGetData(somSelf) \
  73.    (((somTD_FW_OFileSink_DataThunk)(FW_OFileSinkClassData.instanceDataToken))(somSelf))
  74.  
  75. /*
  76.  * -- Instance Data Access Macros for use in Method Procedures
  77.  */
  78. #ifdef VARIABLE_MACROS
  79.   #define _fRep (somThis->fRep)
  80. #endif
  81.  
  82.  
  83. /*
  84.  * Trace/Debug macro
  85.  */
  86. #ifndef FW_OFileSinkMethodDebug
  87. #define FW_OFileSinkMethodDebug(c,m) SOMMethodDebug(c,m)
  88. #endif
  89.  
  90. /*
  91.  * -- Method Macros for use in Method Procedures
  92.  */
  93. #ifdef METHOD_MACROS
  94.   #define _GetLength somSelf->GetLength
  95.   #define _SetLength somSelf->SetLength
  96.   #define _GetPosition somSelf->GetPosition
  97.   #define _SetPosition somSelf->SetPosition
  98.   #define _GetReadableBytes somSelf->GetReadableBytes
  99.   #define _GetReadableBytes somSelf->GetReadableBytes
  100.   #define _Read somSelf->Read
  101.   #define _GetWritableBytes somSelf->GetWritableBytes
  102.   #define _Write somSelf->Write
  103.   #define _somInit somSelf->somInit
  104.   #define _somUninit somSelf->somUninit
  105.   #define _somInit somSelf->somInit
  106.   #define _somUninit somSelf->somUninit
  107.   #define _somDuplicateReference somSelf->somDuplicateReference
  108.   #define _somCompareReference somSelf->somCompareReference
  109.   #define _somRelease somSelf->somRelease
  110.   #define _somFree somSelf->somFree
  111.   #define _somCanDelete somSelf->somCanDelete
  112.   #define _somGetClass somSelf->somGetClass
  113.   #define _somGetClassName somSelf->somGetClassName
  114.   #define _somGetSize somSelf->somGetSize
  115.   #define _somIsA somSelf->somIsA
  116.   #define _somRespondsTo somSelf->somRespondsTo
  117.   #define _somIsInstanceOf somSelf->somIsInstanceOf
  118.   #define _somDispatch somSelf->somDispatch
  119.   #define _somClassDispatch somSelf->somClassDispatch
  120.   #define _somCastObj somSelf->somCastObj
  121.   #define _somResetObj somSelf->somResetObj
  122.   #define _somPrintSelf somSelf->somPrintSelf
  123.   #define _somDumpSelf somSelf->somDumpSelf
  124.   #define _somDumpSelfInt somSelf->somDumpSelfInt
  125.   #define _InitFromOFile somSelf->InitFromOFile
  126.   #define _GetOFileRep somSelf->GetOFileRep
  127.   #define _somInit somSelf->somInit
  128.   #define _somUninit somSelf->somUninit
  129.   #define _Read somSelf->Read
  130.   #define _GetWritableBytes somSelf->GetWritableBytes
  131.   #define _Write somSelf->Write
  132.   #define _GetLength somSelf->GetLength
  133.   #define _SetLength somSelf->SetLength
  134.   #define _GetPosition somSelf->GetPosition
  135.   #define _SetPosition somSelf->SetPosition
  136. #endif
  137.  
  138.  
  139. /*
  140.  * Introduced methods
  141.  */
  142.  
  143. /* New Method: InitFromOFile */
  144. SOM_Scope void  SOMLINK FW_OFileSink__InitFromOFile(FW_OFileSink *somSelf, Environment *ev,
  145.         FW_OFile* theFile);
  146.  
  147. /* New Method: GetOFileRep */
  148. SOM_Scope FW_OFile*  SOMLINK FW_OFileSink__GetOFileRep(FW_OFileSink *somSelf, Environment *ev);
  149.  
  150. /*
  151.  * Overridden methods
  152.  */
  153.  
  154. /* Overridden method: somInit */
  155. SOM_Scope void  SOMLINK FW_OFileSink__somInit(FW_OFileSink *somSelf);
  156. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OFileSink_somInit)(FW_OFileSink *somSelf);
  157. inline void  SOMLINK FW_OFileSink_parent_FW_ORandomAccessSink_somInit(FW_OFileSink *somSelf)
  158. {
  159.   (void)         (somSelf);
  160. }
  161. #define FW_OFileSink_parents_somInit(arg0) \
  162.   (void) FW_OFileSink_parent_FW_ORandomAccessSink_somInit(arg0)
  163.  
  164. /* Overridden method: somUninit */
  165. SOM_Scope void  SOMLINK FW_OFileSink__somUninit(FW_OFileSink *somSelf);
  166. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OFileSink_somUninit)(FW_OFileSink *somSelf);
  167. inline void  SOMLINK FW_OFileSink_parent_FW_ORandomAccessSink_somUninit(FW_OFileSink *somSelf)
  168. {
  169.   (void)         (somSelf);
  170. }
  171. #define FW_OFileSink_parents_somUninit(arg0) \
  172.   (void) FW_OFileSink_parent_FW_ORandomAccessSink_somUninit(arg0)
  173.  
  174. /* Overridden method: Read */
  175. SOM_Scope void  SOMLINK FW_OFileSink__Read(FW_OFileSink *somSelf, Environment *ev,
  176.         void* destination,
  177.         long count);
  178. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OFileSink_Read)(FW_OFileSink *somSelf, Environment *ev,
  179.         void* destination,
  180.         long count);
  181. inline void  SOMLINK FW_OFileSink_parent_FW_ORandomAccessSink_Read(FW_OFileSink *somSelf, Environment *ev,
  182.     void* destination,
  183.     long count)
  184. {
  185.   ((somTD_xih_FW_OFileSink_Read)
  186.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_OSinkClassData.Read))
  187.         (somSelf,ev,destination,count);
  188. #ifdef SOMCHKEXCEPT
  189.   SOMCHKEXCEPT;
  190. #endif
  191. }
  192. #define FW_OFileSink_parents_Read(arg0,arg1,arg2,arg3) \
  193.   (void) FW_OFileSink_parent_FW_ORandomAccessSink_Read(arg0,arg1,arg2,arg3)
  194.  
  195. /* Overridden method: GetWritableBytes */
  196. SOM_Scope long  SOMLINK FW_OFileSink__GetWritableBytes(FW_OFileSink *somSelf, Environment *ev);
  197. SOMEXTERN typedef long   (* SOMLINK somTD_xih_FW_OFileSink_GetWritableBytes)(FW_OFileSink *somSelf, Environment *ev);
  198. inline long  SOMLINK FW_OFileSink_parent_FW_ORandomAccessSink_GetWritableBytes(FW_OFileSink *somSelf, Environment *ev)
  199. {
  200. #ifdef SOMCHKEXCEPT
  201.   long __somRetVal =   ((somTD_xih_FW_OFileSink_GetWritableBytes)
  202.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_OSinkClassData.GetWritableBytes))
  203.         (somSelf,ev);
  204.   SOMCHKEXCEPT;
  205.   return __somRetVal;
  206. #else
  207.   return  ((somTD_xih_FW_OFileSink_GetWritableBytes)
  208.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_OSinkClassData.GetWritableBytes))
  209.         (somSelf,ev);
  210. #endif
  211. }
  212. #define FW_OFileSink_parents_GetWritableBytes(arg0,arg1) \
  213.   (void) FW_OFileSink_parent_FW_ORandomAccessSink_GetWritableBytes(arg0,arg1)
  214.  
  215. /* Overridden method: Write */
  216. SOM_Scope void  SOMLINK FW_OFileSink__Write(FW_OFileSink *somSelf, Environment *ev,
  217.         void* source,
  218.         long count);
  219. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OFileSink_Write)(FW_OFileSink *somSelf, Environment *ev,
  220.         void* source,
  221.         long count);
  222. inline void  SOMLINK FW_OFileSink_parent_FW_ORandomAccessSink_Write(FW_OFileSink *somSelf, Environment *ev,
  223.     void* source,
  224.     long count)
  225. {
  226.   ((somTD_xih_FW_OFileSink_Write)
  227.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_OSinkClassData.Write))
  228.         (somSelf,ev,source,count);
  229. #ifdef SOMCHKEXCEPT
  230.   SOMCHKEXCEPT;
  231. #endif
  232. }
  233. #define FW_OFileSink_parents_Write(arg0,arg1,arg2,arg3) \
  234.   (void) FW_OFileSink_parent_FW_ORandomAccessSink_Write(arg0,arg1,arg2,arg3)
  235.  
  236. /* Overridden method: GetLength */
  237. SOM_Scope long  SOMLINK FW_OFileSink__GetLength(FW_OFileSink *somSelf, Environment *ev);
  238. SOMEXTERN typedef long   (* SOMLINK somTD_xih_FW_OFileSink_GetLength)(FW_OFileSink *somSelf, Environment *ev);
  239. inline long  SOMLINK FW_OFileSink_parent_FW_ORandomAccessSink_GetLength(FW_OFileSink *somSelf, Environment *ev)
  240. {
  241. #ifdef SOMCHKEXCEPT
  242.   long __somRetVal =   ((somTD_xih_FW_OFileSink_GetLength)
  243.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_ORandomAccessSinkClassData.GetLength))
  244.         (somSelf,ev);
  245.   SOMCHKEXCEPT;
  246.   return __somRetVal;
  247. #else
  248.   return  ((somTD_xih_FW_OFileSink_GetLength)
  249.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_ORandomAccessSinkClassData.GetLength))
  250.         (somSelf,ev);
  251. #endif
  252. }
  253. #define FW_OFileSink_parents_GetLength(arg0,arg1) \
  254.   (void) FW_OFileSink_parent_FW_ORandomAccessSink_GetLength(arg0,arg1)
  255.  
  256. /* Overridden method: SetLength */
  257. SOM_Scope void  SOMLINK FW_OFileSink__SetLength(FW_OFileSink *somSelf, Environment *ev,
  258.         long length);
  259. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OFileSink_SetLength)(FW_OFileSink *somSelf, Environment *ev,
  260.         long length);
  261. inline void  SOMLINK FW_OFileSink_parent_FW_ORandomAccessSink_SetLength(FW_OFileSink *somSelf, Environment *ev,
  262.     long length)
  263. {
  264.   ((somTD_xih_FW_OFileSink_SetLength)
  265.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_ORandomAccessSinkClassData.SetLength))
  266.         (somSelf,ev,length);
  267. #ifdef SOMCHKEXCEPT
  268.   SOMCHKEXCEPT;
  269. #endif
  270. }
  271. #define FW_OFileSink_parents_SetLength(arg0,arg1,arg2) \
  272.   (void) FW_OFileSink_parent_FW_ORandomAccessSink_SetLength(arg0,arg1,arg2)
  273.  
  274. /* Overridden method: GetPosition */
  275. SOM_Scope long  SOMLINK FW_OFileSink__GetPosition(FW_OFileSink *somSelf, Environment *ev);
  276. SOMEXTERN typedef long   (* SOMLINK somTD_xih_FW_OFileSink_GetPosition)(FW_OFileSink *somSelf, Environment *ev);
  277. inline long  SOMLINK FW_OFileSink_parent_FW_ORandomAccessSink_GetPosition(FW_OFileSink *somSelf, Environment *ev)
  278. {
  279. #ifdef SOMCHKEXCEPT
  280.   long __somRetVal =   ((somTD_xih_FW_OFileSink_GetPosition)
  281.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_ORandomAccessSinkClassData.GetPosition))
  282.         (somSelf,ev);
  283.   SOMCHKEXCEPT;
  284.   return __somRetVal;
  285. #else
  286.   return  ((somTD_xih_FW_OFileSink_GetPosition)
  287.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_ORandomAccessSinkClassData.GetPosition))
  288.         (somSelf,ev);
  289. #endif
  290. }
  291. #define FW_OFileSink_parents_GetPosition(arg0,arg1) \
  292.   (void) FW_OFileSink_parent_FW_ORandomAccessSink_GetPosition(arg0,arg1)
  293.  
  294. /* Overridden method: SetPosition */
  295. SOM_Scope void  SOMLINK FW_OFileSink__SetPosition(FW_OFileSink *somSelf, Environment *ev,
  296.         long position);
  297. SOMEXTERN typedef void   (* SOMLINK somTD_xih_FW_OFileSink_SetPosition)(FW_OFileSink *somSelf, Environment *ev,
  298.         long position);
  299. inline void  SOMLINK FW_OFileSink_parent_FW_ORandomAccessSink_SetPosition(FW_OFileSink *somSelf, Environment *ev,
  300.     long position)
  301. {
  302.   ((somTD_xih_FW_OFileSink_SetPosition)
  303.     somParentNumResolve((somClassDataStructure*)&FW_OFileSinkClassData, 1, FW_ORandomAccessSinkClassData.SetPosition))
  304.         (somSelf,ev,position);
  305. #ifdef SOMCHKEXCEPT
  306.   SOMCHKEXCEPT;
  307. #endif
  308. }
  309. #define FW_OFileSink_parents_SetPosition(arg0,arg1,arg2) \
  310.   (void) FW_OFileSink_parent_FW_ORandomAccessSink_SetPosition(arg0,arg1,arg2)
  311.  
  312. /*
  313.  * -- Primary Implementation File Support
  314.  */
  315. #if (defined(FW_OFileSink_Class_Source) || defined(SOM_Module_slfileac_Source))
  316.  
  317. /*
  318.  * -- The FW_OFileSink ClassData Structure
  319.  */
  320.  
  321. #if PRAGMA_IMPORT_SUPPORTED
  322. #pragma export list FW_OFileSinkClassData
  323. #endif
  324.  
  325.  
  326. /*
  327.  * -- The FW_OFileSink Class Ancestor Table
  328.  */
  329. static somClassDataStructure * SOMDLINK FW_OFileSinkClassAncestors [] = {
  330.     (somClassDataStructure*) & FW_ORandomAccessSinkClassData,    /* parent */
  331.     (somClassDataStructure*) & SOMObjectClassData,    /* ancestor */
  332.     (somClassDataStructure*) & FW_OSinkClassData,    /* ancestor */
  333. };
  334.  
  335.  
  336. /*
  337.  * -- The FW_OFileSink Override ProcPtr Implementations Table
  338.  */
  339. static somMethodPtr FW_OFileSinkOverrideProcs [] = {
  340.     (somMethodPtr) FW_OFileSink__GetLength,    /* override class FW_ORandomAccessSink */
  341.     (somMethodPtr) FW_OFileSink__SetLength,    /* override class FW_ORandomAccessSink */
  342.     (somMethodPtr) FW_OFileSink__GetPosition,    /* override class FW_ORandomAccessSink */
  343.     (somMethodPtr) FW_OFileSink__SetPosition,    /* override class FW_ORandomAccessSink */
  344.     (somMethodPtr) FW_OFileSink__somInit,    /* override class SOMObject */
  345.     (somMethodPtr) FW_OFileSink__somUninit,    /* override class SOMObject */
  346.     (somMethodPtr) FW_OFileSink__Read,    /* override class FW_OSink */
  347.     (somMethodPtr) FW_OFileSink__GetWritableBytes,    /* override class FW_OSink */
  348.     (somMethodPtr) FW_OFileSink__Write,    /* override class FW_OSink */
  349. };
  350.  
  351.  
  352. static void FW_OFileSinkDLLD ( void ) { }
  353.  
  354.  
  355. /*
  356.  * -- The FW_OFileSink Static Class Info Master Table
  357.  */
  358. static somStaticClassInfo FW_OFileSinkSCI = {
  359.       70,    /* layout version */
  360.     (somClassDataStructure*)  & FW_OFileSinkClassData,    /* main token table */
  361.       FW_OFileSinkOverrideProcs,    /* override proc implemenations table */
  362.       FW_OFileSinkClassAncestors,    /* ancestor table */
  363.       FW_OFileSinkDLLD,    /* DLLdesignator */
  364.       0,    /* no special procs */
  365.       0,    /* rtci slot */
  366.       0,    /* count slot */
  367.       0,    /* dynamic ancestry */
  368.       0,    /* free */
  369.       0,    /* free */
  370.       0,    /* free */
  371.       0,    /* free */
  372.  
  373. /*
  374.  * -- The FW_OFileSink Counts Table
  375.  */
  376.     (somStaticClassCounts *)
  377.         "\x00\x00\x00\x01"    /* majorversion */
  378.         "\x00\x00\x00\x00"    /* minorversion */
  379.         "\x00\x00\x00\x01"    /* flags */
  380.             "\x00\x02"    /* type code alignment */
  381.             "\x00\x02"    /* classTokenCount */
  382.             "\x00\x01"    /* numDirectParents */
  383.             "\x00\x00"    /* numMetaClasses */
  384.             "\x00\x03"    /* numOverriddenAncestors */
  385.             "\x00\x00"    /* numMigratedMethods */
  386.             "\x00\x00"    /* numSelectedInherited */
  387.             "\x00\x00"    /* numUnused */
  388.             "\x00\x00"    /* free */
  389.             "\x00\x00"    /* free */
  390.             "\x00\x00"    /* free */
  391.             "\x00"    /* free */
  392.                 ,
  393.  
  394.     {
  395.       "FW_OFileSink",    /* the class name */
  396.       sizeof (FW_OFileSinkData), /* class instance data size */
  397.  
  398. /*
  399.  * -- The FW_OFileSink Parent Versions Table
  400.  */
  401.     (somParentVersions *)
  402.         "\x00\x00\x00\x01"    /* majorversion */
  403.         "\x00\x00\x00\x00"    /* minorversion */
  404.                 ,
  405.  
  406.  
  407. /*
  408.  * -- The FW_OFileSink Token Slot Usage Table
  409.  */
  410.     (somSlotUsage *)
  411.         "",
  412.  
  413.  
  414. /*
  415.  * -- The FW_OFileSink Method Signature Info
  416.  */
  417.     (somSignatureInfo *)
  418.         "\x03\x07"    /* InitFromOFile */
  419.          "\x02\x0c"    /* GetOFileRep */
  420.              ,
  421.  
  422.  
  423. /*
  424.  * -- The FW_OFileSink Class Method Names
  425.  */
  426.         "InitFromOFile\0"
  427.         "GetOFileRep\0"
  428.             ,
  429.  
  430.  
  431. /*
  432.  * -- The FW_OFileSink Override Slots Table
  433.  */
  434.     (somOverrideData *)
  435.         "\x00\x00\x00\x04"    /* parent FW_ORandomAccessSink has 4 overrides */
  436.             "\x00\x00"    /* GetLength */
  437.             "\x00\x01"    /* SetLength */
  438.             "\x00\x02"    /* GetPosition */
  439.             "\x00\x03"    /* SetPosition */
  440.         "\x00\x01\x00\x02"    /* parent SOMObject has 2 overrides */
  441.             "\x00\x00"    /* somInit */
  442.             "\x00\x01"    /* somUninit */
  443.         "\x00\x02\x00\x03"    /* parent FW_OSink has 3 overrides */
  444.             "\x00\x03"    /* Read */
  445.             "\x00\x04"    /* GetWritableBytes */
  446.             "\x00\x05"    /* Write */
  447.                 ,
  448.  
  449.       0,    /* no migrated methods table */
  450.       0,    /* no selected inherited */
  451.       0,    /* unused */
  452.  
  453.       0,    /* free */
  454.       0,    /* free */
  455.       0,    /* free */
  456.       0,    /* free */
  457.     },
  458. };
  459.  
  460. /*
  461.  * -- The FW_OFileSink ClassData Structure
  462.  */
  463. struct FW_OFileSinkClassDataStructure SOMDLINK FW_OFileSinkClassData = {
  464.       0,            /* zero */
  465.     & FW_OFileSinkSCI,        /* SCI link */
  466.       0,            /* instanceDataToken */
  467.       0,            /* reserved */
  468.       0,            /* reserved */
  469.       0,            /* reserved */
  470.     (somMToken) FW_OFileSink__InitFromOFile,    /* InitFromOFile:method */
  471.     (somMToken) FW_OFileSink__GetOFileRep,    /* GetOFileRep:method */
  472. };
  473.  
  474.  
  475. /*
  476.  * Functions for attributes.
  477.  */
  478.  
  479. /*
  480.  * Macros for initializers/destructors
  481.  */
  482.  
  483. #endif /* Primary Implementation Support */
  484.  
  485. #endif       /* SOM_FW_OFileSink_xih */
  486.